package com.xq.shop.service.user.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xq.shop.dao.IBaseDAO;
import com.xq.shop.dao.IProductDAO;
import com.xq.shop.po.Product;
import com.xq.shop.service.user.IProductService;

@Service("user_prodcut_service")
public class ProductService extends BaseService<Product> implements IProductService {

	@Autowired
	private IProductDAO productDAO;
	
	@Override
	public IBaseDAO<Product> getDAO() {
		return productDAO;
	}
	
	public int list(Map<String, Map<String, Object>> param){
		
		List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
		Map<String, Object> v1 = new HashMap<String, Object>();
		Map<String, Object> v2 = new HashMap<String, Object>();
		Map<String, Object> v3 = new HashMap<String, Object>();
		v1.put("param_id", 1L);
		v1.put("type", "");
		v1.put("value", "1");
		v2.put("param_id", 2L);
		v2.put("value", "2");
		v3.put("param_id", 3L);
		v3.put("value", "3");
		list.add(v1);
		list.add(v2);
		list.add(v3);
		
		return productDAO.list(list);
	}
}
